Optimal. Leaf size=96 \[ \frac {35 a^4 \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {8 a^4 \tan (c+d x)}{d}+\frac {27 a^4 \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a^4 \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {4 a^4 \tan ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2836, 3855,
3852, 8, 3853} \begin {gather*} \frac {4 a^4 \tan ^3(c+d x)}{3 d}+\frac {8 a^4 \tan (c+d x)}{d}+\frac {35 a^4 \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {a^4 \tan (c+d x) \sec ^3(c+d x)}{4 d}+\frac {27 a^4 \tan (c+d x) \sec (c+d x)}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2836
Rule 3852
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int (a+a \cos (c+d x))^4 \sec ^5(c+d x) \, dx &=\int \left (a^4 \sec (c+d x)+4 a^4 \sec ^2(c+d x)+6 a^4 \sec ^3(c+d x)+4 a^4 \sec ^4(c+d x)+a^4 \sec ^5(c+d x)\right ) \, dx\\ &=a^4 \int \sec (c+d x) \, dx+a^4 \int \sec ^5(c+d x) \, dx+\left (4 a^4\right ) \int \sec ^2(c+d x) \, dx+\left (4 a^4\right ) \int \sec ^4(c+d x) \, dx+\left (6 a^4\right ) \int \sec ^3(c+d x) \, dx\\ &=\frac {a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {3 a^4 \sec (c+d x) \tan (c+d x)}{d}+\frac {a^4 \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{4} \left (3 a^4\right ) \int \sec ^3(c+d x) \, dx+\left (3 a^4\right ) \int \sec (c+d x) \, dx-\frac {\left (4 a^4\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}-\frac {\left (4 a^4\right ) \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{d}\\ &=\frac {4 a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {8 a^4 \tan (c+d x)}{d}+\frac {27 a^4 \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a^4 \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {4 a^4 \tan ^3(c+d x)}{3 d}+\frac {1}{8} \left (3 a^4\right ) \int \sec (c+d x) \, dx\\ &=\frac {35 a^4 \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {8 a^4 \tan (c+d x)}{d}+\frac {27 a^4 \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a^4 \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {4 a^4 \tan ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(797\) vs. \(2(96)=192\).
time = 6.41, size = 797, normalized size = 8.30 \begin {gather*} -\frac {35 (a+a \cos (c+d x))^4 \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) \sec ^8\left (\frac {c}{2}+\frac {d x}{2}\right )}{128 d}+\frac {35 (a+a \cos (c+d x))^4 \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) \sec ^8\left (\frac {c}{2}+\frac {d x}{2}\right )}{128 d}+\frac {(a+a \cos (c+d x))^4 \sec ^8\left (\frac {c}{2}+\frac {d x}{2}\right )}{256 d \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^4}+\frac {(a+a \cos (c+d x))^4 \sec ^8\left (\frac {c}{2}+\frac {d x}{2}\right ) \sin \left (\frac {d x}{2}\right )}{24 d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^3}+\frac {(a+a \cos (c+d x))^4 \sec ^8\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (97 \cos \left (\frac {c}{2}\right )-65 \sin \left (\frac {c}{2}\right )\right )}{768 d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^2}+\frac {5 (a+a \cos (c+d x))^4 \sec ^8\left (\frac {c}{2}+\frac {d x}{2}\right ) \sin \left (\frac {d x}{2}\right )}{12 d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}-\frac {(a+a \cos (c+d x))^4 \sec ^8\left (\frac {c}{2}+\frac {d x}{2}\right )}{256 d \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^4}+\frac {(a+a \cos (c+d x))^4 \sec ^8\left (\frac {c}{2}+\frac {d x}{2}\right ) \sin \left (\frac {d x}{2}\right )}{24 d \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^3}+\frac {(a+a \cos (c+d x))^4 \sec ^8\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (-97 \cos \left (\frac {c}{2}\right )-65 \sin \left (\frac {c}{2}\right )\right )}{768 d \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^2}+\frac {5 (a+a \cos (c+d x))^4 \sec ^8\left (\frac {c}{2}+\frac {d x}{2}\right ) \sin \left (\frac {d x}{2}\right )}{12 d \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.23, size = 142, normalized size = 1.48
method | result | size |
derivativedivides | \(\frac {a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 a^{4} \tan \left (d x +c \right )+6 a^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-4 a^{4} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+a^{4} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(142\) |
default | \(\frac {a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 a^{4} \tan \left (d x +c \right )+6 a^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-4 a^{4} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+a^{4} \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(142\) |
risch | \(-\frac {i a^{4} \left (81 \,{\mathrm e}^{7 i \left (d x +c \right )}-96 \,{\mathrm e}^{6 i \left (d x +c \right )}+105 \,{\mathrm e}^{5 i \left (d x +c \right )}-480 \,{\mathrm e}^{4 i \left (d x +c \right )}-105 \,{\mathrm e}^{3 i \left (d x +c \right )}-544 \,{\mathrm e}^{2 i \left (d x +c \right )}-81 \,{\mathrm e}^{i \left (d x +c \right )}-160\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {35 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}-\frac {35 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}\) | \(145\) |
norman | \(\frac {\frac {93 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {605 a^{4} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {5 a^{4} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {515 a^{4} \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {125 a^{4} \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {133 a^{4} \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {35 a^{4} \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {35 a^{4} \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {35 a^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {35 a^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(224\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 182 vs.
\(2 (88) = 176\).
time = 0.28, size = 182, normalized size = 1.90 \begin {gather*} \frac {64 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{4} - 3 \, a^{4} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 72 \, a^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 24 \, a^{4} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 192 \, a^{4} \tan \left (d x + c\right )}{48 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.71, size = 111, normalized size = 1.16 \begin {gather*} \frac {105 \, a^{4} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 105 \, a^{4} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (160 \, a^{4} \cos \left (d x + c\right )^{3} + 81 \, a^{4} \cos \left (d x + c\right )^{2} + 32 \, a^{4} \cos \left (d x + c\right ) + 6 \, a^{4}\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.51, size = 122, normalized size = 1.27 \begin {gather*} \frac {105 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 105 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (105 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 385 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 511 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 279 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.50, size = 141, normalized size = 1.47 \begin {gather*} \frac {35\,a^4\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}-\frac {\frac {35\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}-\frac {385\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}+\frac {511\,a^4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12}-\frac {93\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________